/* eslint-disable */
//查询结果模块
<template>
	<div class="statusCheckedBox_container">
	  <el-checkbox-group v-model="status">
		<el-checkbox label="healing" :disabled="disabled">治愈</el-checkbox>
		<el-checkbox label="better" :disabled="disabled">好转</el-checkbox>
		<el-checkbox label="worse" :disabled="disabled">恶化</el-checkbox>
		<el-checkbox label="dead" :disabled="disabled">死亡</el-checkbox>
	  </el-checkbox-group>
	</div>
</template>

<script>
export default {
  /*
  * 组件名
  */
  name: 'StatusCheckBox',
  
  /*
  * 向组件外部暴露的变量
  */
  props: {
    data: Object,
	disabled:Boolean
  },
  
  /*
  * 组件数据
  */
  data(){
    return{
		status:[],
    }
  },
  
  /*
  * 组件内部方法
  */
  methods:{
	  setStatus:function(status){
		  if(status.healing){
		  	this.status.push("healing");
		  }
		  if(status.better){
		  	this.status.push("better");
		  }
		  if(status.worse){
		  	this.status.push("worse");
		  }
		  if(status.dead){
		  	this.status.push("dead");
		  }
	  }
  },
  
  computed:{

  },
  
  /*
  * 生命周期函数,页面创建时调用
  */
  created(){
		this.setStatus(this.data);
  },
  
  /*
   *  监听数据发生改变
   */
  watch: {
  	data: function(){
		this.status=[];
		this.setStatus(this.data);
  	},
  },
}
</script>

<!-- 组件内部样式 -->
<style scoped>
/*多选样式*/
.statusCheckedBox_container /deep/ .el-checkbox__inner{
	border-radius: 7px; 
}

.el-checkbox.is-disabled.is-checked /deep/ .el-checkbox__inner{
		background-color: #c4c4c4;
}

</style>
